<nav class="navbar navbar-default">
  <div class="container">    <!-- container-fluid -->
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Tracer</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="#">产品功能</a></li>
        <li><a href="#">企业方案</a></li>
        <li><a href="#">帮助文档</a></li>
        <li><a href="{% url 'web:price_show' %}">价格</a></li>
        
     </ul>


      <ul class="nav navbar-nav navbar-right">
      {% if not request.tracer.user %}
        <li><a href="/web/login">登录</a></li>
        <li><a href="/web/register/">注册</a></li>
      {% else %}
        <li style='margin-top:0px;'><a href='{% url 'web:pay_cart' %}'><i class="fa fa-shopping-cart fa-3" aria-hidden="true"></i></a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{request.tracer.user.username}}<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href={% url 'web:project_list' %}>管理中心</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="{% url 'web:logout' %}">退 出</a></li>
            <!-- <li role="separator" class="divider"></li>  -->
            <!-- <li><a href="#">One more separated link</a></li>  -->
          </ul>
        </li>

      {% endif %}


      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
